#pragma once
#include "../../common/include/obj.h"
#include "ecb_mode.h"

class C_CBC_MODE : public C_IV16_MODE
{
public:
    virtual int Encrypt(BYTE *pIn, int iLenIn, BYTE *pOut, int *piLenOut, IBlockCipherKernel *pobjKer);
    virtual int Decrypt(BYTE *pIn, int iLenIn, BYTE *pOut, int *piLenOut, IBlockCipherKernel *pobjKer);
};

class C_CBC_MAC_MODE : public C_CBC_MODE
{
public:
    virtual int Encrypt(BYTE *pIn, int iLenIn, BYTE *pOut, int *piLenOut, IBlockCipherKernel *pobjKer);
    virtual int Decrypt(BYTE *pIn, int iLenIn, BYTE *pOut, int *piLenOut, IBlockCipherKernel *pobjKer) { return COMMON_ERR_NOT_INHERITED; };
};
